public class BipartiteCondition extends Condition
| Constructor and Description |
|---|
BipartiteCondition() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
satisfies(Graph existingGraph)
Used to test if the supplied graph is within the bounds of the
condition's implementation.
|
private boolean |
satisfies(Graph existingGraph,
java.util.Set<Node> addSet,
java.util.Set<Node> compareSet,
Node current)
Private method for stepping through the adjacency lists and determining
if the graph is bipartite.
|
public boolean satisfies(Graph existingGraph)
Checks to determine if the supplied graph is Bipartite.
private boolean satisfies(Graph existingGraph, java.util.Set<Node> addSet, java.util.Set<Node> compareSet, Node current)
existingGraph - the Graph object to test against.addSet - the current set to add a node to based on the previous.compareSet - the current set to add adjacent nodes to.current - the current Node being compared.